public class HappyNewYear {
    public static void main(String[] args) {
        for (int i = 10; i >= 1; --i) {
            System.out.printf("%d\r", i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
        System.out.println("Happy New Year");
    }
}
